package liurong.driver.proxy.jdk;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class JdkProxyHandler implements InvocationHandler {

	private Object obj;

	public JdkProxyHandler(Object obj) {
		this.obj = obj;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		System.out.println("准备开始 work");
		Object reslut = method.invoke(obj, args);
		System.out.println("准备结束 work");
		return reslut;
	}

}
